<!DOCTYPE html>
<html>
   <head>
      <!-- 视频测试 -->
      <meta charset="utf-8" />
      <title>视频测试</title>

      <style></style>
   </head>

   <body>
      <div class="bg">
         <button onclick="playPause()"><ins>播放/暂停</ins></button>
         <button onclick="makeBig()">放大</button>
         <button onclick="makeSmall()">缩小</button>
         <button onclick="makeNormal()">普通</button>
         <br />
         <video id="video1" width="420" controls>
            <source src="https://www.runoob.com/try/demo_source/mov_bbb.mp4" type="video/mp4" />
         </video>
         测试文字
      </div>
   </body>
</html>

<script>
   var myVideo = document.getElementById("video1");

   function playPause() {
      if (myVideo.paused) myVideo.play();
      else myVideo.pause();
   }

   function makeBig() {
      myVideo.width = 560;
   }

   function makeSmall() {
      myVideo.width = 320;
   }

   function makeNormal() {
      myVideo.width = 420;
   }
</script>
